package com.balabala.gym_system.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@TableName("tb_notice")
@Data
public class Notice implements Serializable {

    //编号
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Field("message_title")//消息标题
    private String messageTitle;

    @Field("message")//发布内容
    private String message;

    //发布时间
    @Field("create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    //发布人员
    @Field("admin_id")
    private Long adminId;

    //逻辑删除
    @TableLogic(value = "0",delval = "1")
    private Integer deleted;

}
